#include<bits/stdc++.h>
using namespace std;
int solve() {
  long long n;cin>>n;
  long long sum=n*(n+1);
  if(sum%4!=0) {
    cout << "NO\n";
    return 0;
  }
  // set<int, less<int>> s1,s2;
  vector<int> v1,v2;
  sum/=4;
  for(int i=n;i>0;--i) {
    if(sum-i>=0) {
      sum-=i;
      v1.push_back(i);
    } else {
      v2.push_back(i);
    }
  }
  cout<<"YES\n";
  cout<<v1.size()<<endl;
  for(int el:v1) cout << el<<" ";
  cout<<endl;
  cout<<v2.size()<<endl;
  for(int el:v2) cout << el<<" ";
  cout<<endl;
  return 0;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0); cout.tie(0);
  // freopen("in.txt","r",stdin);
  // freopen("out.txt","w",stdout);
  int tc; tc = 1;
  for(int t = 1; t <= tc; t++) {
    // cout << "Case #" << t << ": "
    solve();
  }
  return 0;
}
